package com.viettel.synctask;

import java.util.ArrayList;
import java.util.Date;

import android.os.AsyncTask;
import android.util.Log;

import com.viettel.BO.*;
import com.viettel.rmsmobile.FindJob;
import com.viettel.data.*;

public class RecruitmentAnouncementSyncTask extends AsyncTask<Object, Boolean, ArrayList<RecruitmentAnouncementBean>> {

	FindJob findJobFragement;
	@Override
	protected ArrayList<RecruitmentAnouncementBean> doInBackground(
			Object... params) {
		findJobFragement = (FindJob) params[0];
		//Date currentDate = (Date) params[1];
		//String siteUrl = params[2].toString();
		RecruitmentAnouncementFetcher anouncementFetcher = new RecruitmentAnouncementFetcher(null, null);
		return anouncementFetcher.getList();
	}

	@Override
	protected void onPostExecute(ArrayList<RecruitmentAnouncementBean> response) {
		try
		{
			findJobFragement.setJoblist(response);
		}
		catch(Exception e)
		{
			Log.d("Error: ", " "+e.getMessage());
		}
		super.onPostExecute(response);
	}
}
